﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RoleManagement.ascx.cs"
    Inherits="Framework.Portal.Layouts.Admin.Components.Roles.RoleManagement" %>
<table border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
    <tr>
        <td class="postheader" width="40%" align="left" valign="top">
            <asp:UpdatePanel ID="upanelRoleManagement" runat="server" UpdateMode="Conditional"
                RenderMode="Inline">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="General_btnUpdate" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="General_btnAdd" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="General_btnDelete" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <table border="0" cellpadding="0" cellspacing="1" class="content" style="width: 100%">
                        <tr>
                            <td class="post" align="left">
                                <asp:TreeView ID="tvwCmds" runat="server" ExpandImageUrl="/Resource/Images/icon/14/col.gif"
                                    CollapseImageUrl="/Resource/Images/icon/14/exp.gif" NodeStyle-CssClass="TreeNode"
                                    NodeIndent="15" NoExpandImageUrl="/Resource/Images/icon/14/noexp.gif"
                                    SelectedNodeStyle-CssClass="SelectedTreeNode" OnSelectedNodeChanged="tvwCmds_SelectedNodeChanged">
                                </asp:TreeView>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td class="postcaption" width="60%" align="left" valign="top">
            <asp:UpdatePanel ID="upanelRoleManagement1" runat="server" UpdateMode="Conditional"
                RenderMode="Inline">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="tvwCmds" EventName="SelectedNodeChanged" />
                </Triggers>
                <ContentTemplate>
                    <div id="TabSystem1" class="content1">
                        <div class="tabs">
                            <div class="tabrow">
                                <asp:LinkButton ID="btnGeneral" runat="server" CssClass="tab tabActive" Text="Cơ bản"
                                    OnClick="ActiveTab" CommandArgument="1"></asp:LinkButton>
                                <asp:LinkButton ID="btnMember" runat="server" CssClass="tab" Enabled="false" Text="Thành viên" OnClick="ActiveTab"
                                    CommandArgument="2"></asp:LinkButton>
                                <asp:LinkButton ID="btnPermission" runat="server" CssClass="tab" Enabled="false" Text="Phân quyền"
                                    OnClick="ActiveTab" CommandArgument="3"></asp:LinkButton>
                            </div>
                            <div class="tabcontent">
                                <asp:Panel ID="panelGeneral" runat="server" Visible="true">
                                    <table width="100%" cellspacing="1" cellpadding="0" border="0" class="content">                                       
                                        <tr>
                                            <td colspan="2" class="header2" height="18">
                                                <asp:Label ID="General_lblUpdate" runat="server" ForeColor="Blue"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postheader" width="30%" align="left">
                                                <NS:Label ID="Label10" runat="server" LocalizedPage="FORMCAPTION"
                                                    LocalizedTag="ID" />
                                            </td>
                                            <td class="post" width="75%" align="left">
                                                <asp:Label ID="General_lblID" runat="server" Font-Bold="true"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postheader" width="30%" align="left">
                                                <NS:Label ID="Label6" runat="server" LocalizedPage="FORMCAPTION"
                                                    LocalizedTag="PARENTID" />
                                            </td>
                                            <td class="post" width="75%" align="left">
                                                <asp:DropDownList ID="General_drpRoleParentID" runat="server" DataTextField="RoleName" DataValueField="RoleID">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postheader" width="30%" align="left">
                                                <NS:Label ID="Label4" runat="server" LocalizedPage="FORMCAPTION"
                                                    LocalizedTag="NAME" />
                                            </td>
                                            <td class="post" width="75%" align="left">
                                                <asp:TextBox ID="General_txtRoleName" runat="server" CssClass="inputTextBox150"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postheader" width="30%" align="left">
                                                <NS:Label ID="Label5" runat="server" LocalizedPage="FORMCAPTION"
                                                    LocalizedTag="DESCRIPTION" />
                                            </td>
                                            <td class="post" width="75%" align="left">
                                                <asp:TextBox ID="General_txtRoleDescription" runat="server" Height="60px" TextMode="MultiLine"
                                                    CssClass="inputTextBox150"></asp:TextBox>
                                            </td>
                                        </tr>                                  
                                        <tr>
                                            <td class="postfooter" colspan="2" valign="middle" align="center">
                                                <NS:Button LocalizedPage="ACTION" LocalizedTag="UPDATE" ID="General_btnUpdate" runat="server" OnClick="General_btnUpdate_Click" Width="77px" />
                                                <NS:Button LocalizedPage="ACTION" LocalizedTag="CREATE" ID="General_btnAdd" runat="server" OnClick="General_btnAdd_Click" Width="77px" />
                                                <NS:Button LocalizedPage="ACTION" LocalizedTag="DELETE" ID="General_btnDelete" runat="server" CssClass="pbutton" OnClick="General_btnDelete_Click" Width="77px" />
                                                <NS:Button LocalizedPage="ACTION" LocalizedTag="RESET" ID="General_btnCancel" runat="server" Width="77px" OnClick="General_btnCancel_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="panelMember" runat="server" Visible="false">
                                    <asp:Repeater ID="rptUser" runat="server" OnItemDataBound="rptUser_ItemDataBound" OnItemCommand="rptUser_ItemCommand">
                                        <HeaderTemplate>
                                            <table border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
                                                <tr>
                                                    <td class="header2" align="center" height="18" width="5%">
                                                        #
                                                    </td>
                                                    <td class="header2" align="left" height="18" width="85%">
                                                        Name
                                                    </td>
                                                    <td class="header2" align="center" height="18" width="10%">
                                                        Action
                                                    </td>
                                                </tr>
                                        </HeaderTemplate>
                                        <FooterTemplate>
                                            <tr>
                                                <td class="postfooter" colspan="3" align="left" height="18">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            </table>
                                            <br />
                                        </FooterTemplate>
                                        <ItemTemplate>
                                            <tr>
                                                <td class="post" align="center" height="18">
                                                    <asp:Label ID="lblSTT" runat="server"></asp:Label>
                                                </td>
                                                <td class="post" align="left" height="18">
                                                    <asp:Label ID="lblName" runat="server"></asp:Label>
                                                </td>
                                                <td class="post" align="center" height="18">
                                                    <NS:ImageButton id="Label7" runat="server" localizedpage="IMAGEACTION" localizedtag="DELETE24" />
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <AlternatingItemTemplate>
                                            <tr>
                                                <td class="postheader" align="center" height="18">
                                                    <asp:Label ID="lblSTT" runat="server"></asp:Label>
                                                </td>
                                                <td class="postheader" align="left" height="18">
                                                    <asp:Label ID="lblName" runat="server"></asp:Label>
                                                </td>
                                                <td class="postheader" align="center" height="18">
                                                    <NS:ImageButton id="Label7" runat="server" localizedpage="IMAGEACTION" localizedtag="DELETE24" />
                                                </td>
                                            </tr>
                                        </AlternatingItemTemplate>
                                    </asp:Repeater>
                                    <table id="boxMember" border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
                                        <tr>
                                            <td class="header2" colspan="2" align="left" height="18">
                                                <asp:Label ID="Member_lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postheader" width="30%" align="left">
                                                <NS:Label ID="Label1" runat="server" LocalizedPage="FORMCAPTION"
                                                    LocalizedTag="PARENTID" />
                                            </td>
                                            <td class="post" width="75%" align="left">
                                                <asp:DropDownList ID="Member_drpUser" runat="server" DataTextField="USERNAME" DataValueField="USERID" Width="90%">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postfooter" colspan="2" valign="middle" align="center">
                                                <NS:Button LocalizedPage="ACTION" LocalizedTag="CREATE" ID="Member_btnAdd" runat="server" OnClick="Member_btnAdd_Click" Width="77px" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="panelPermission" runat="server" Visible="false">
                                    <table id="boxPermission" border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
                                        <tr>
                                            <td class="header2" colspan="2" align="left" height="18">
                                                <asp:Label ID="Permission_lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postheader" width="30%" align="left">
                                                <NS:Label ID="Label3" runat="server" LocalizedPage="FORMCAPTION"
                                                    LocalizedTag="PARENTID" />
                                            </td>
                                            <td class="post" width="75%" align="left">
                                                <asp:ListBox ID="Permission_drpMenu" Width="90%" runat="server" SelectionMode="Multiple" Rows="15"></asp:ListBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="postfooter" colspan="2" valign="middle" align="center">
                                                <NS:Button LocalizedPage="ACTION" LocalizedTag="UPDATE" ID="Permission_btnUpdate" runat="server" OnClick="Permission_btnUpdate_Click" Width="77px" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </div>
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
</table>
